﻿@model WebUI.Models.Hospital
@using (Ajax.BeginForm(new AjaxOptions()
{
    LoadingElementId="OnLoadingSpan",UpdateTargetId = ViewBag.utid,
    InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace,
    HttpMethod = "Post",
    OnSuccess = "$('#dialogbox').dialog('close');",
    OnFailure = "OnSiteError"
}))
{
    @Html.ValidationSummary(true)
    <fieldset>
        @Html.HiddenFor(model => model.HospitalID)
        <div class="editor-label">
            @Html.LabelFor(model => model.HospName);
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HospName)
            @Html.ValidationMessageFor(model => model.HospName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.HospStatus);
        </div>
        <div class="editor-field">
            @*@Html.DropDownListFor(model => model.HospStatus, new SelectList(ViewBag.Status, "OptionValue", "OptionTitle"))*@
            @Html.EditorFor(model => model.HospStatus, "Status")
            @Html.ValidationMessageFor(model => model.HospStatus)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model=>model.HospCode);
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.HospCode)
            @Html.ValidationMessageFor(model => model.HospCode)
        </div>
        <p>
            <input class="ui-button" type="submit" value="保存" />
        </p>
    </fieldset>
}